// 在路由配置中设置路由
import { createRouter,
   createWebHashHistory,
   createWebHistory } from "vue-router";
   
import LoginPage from "../LoginPage.vue";
import HomePage from "../HomePage.vue"; // 修改为 home.vue


const router = createRouter({
  history:createWebHashHistory(),

  routes:[
    {
      path:'/',
      component:LoginPage,

      children:[
        {
          path:'/HomePage/',
          component:HomePage
        }
      ]
    }
  ]
});
// const routes = [
//   {
//     path: '/',
//     name: "Login",
//     component: LoginPage
//   },
//   {
//     path: '/home',
//     name: "Home",
//     component: HomePage,
//   },
// ];

// const router = createRouter({
//   history: createWebHashHistory(),
//   routes,
// });

export default router;

